* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
}

.browser-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background-color: #ffffff;
    flex: 1 1 auto;
    height: 100vh;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 8px;
    flex-shrink: 0;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 4px;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background-color: #ffffff;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}

.toolbar-btn:active {
    background-color: #dee2e6;
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.address-bar-container {
    flex: 1;
    display: flex;
    gap: 8px;
}

.address-bar {
    flex: 1;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.address-bar:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.go-btn {
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.go-btn:hover {
    background-color: #0056b3;
}

.go-btn:active {
    background-color: #004085;
}

/* 标签页栏样式 */
.tab-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 8px;
    flex-shrink: 0;
}

.tab-list {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #f8f9fa;
}

.tab-list::-webkit-scrollbar {
    /* height: 4px;  // 移除对滚动条高度的限制 */
}

.tab-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.tab-list::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 2px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    min-width: 120px;
    max-width: 200px;
    transition: all 0.2s ease;
    position: relative;
}

.tab.active {
    background-color: #ffffff;
    border-color: #007bff;
    color: #007bff;
}

.tab:hover {
    background-color: #e9ecef;
}

.tab.active:hover {
    background-color: #ffffff;
}

.tab-title {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-close {
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: #6c757d;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.tab-close:hover {
    background-color: #dc3545;
    color: white;
}

/* 内容区域样式 */
.content-area {
    flex: 1 1 auto;
    position: relative;
    background-color: #ffffff;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column; 
}

webview {
    flex: 1 1 auto;
    border: none;
    display: flex;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
}

/* 状态栏样式 */
.status-bar {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 12px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: #6c757d;
    height: 24px;
}

#statusText {
    flex: 1;
}

#versionText {
    font-weight: 500;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbar {
        padding: 4px 8px;
        gap: 4px;
    }
    
    .toolbar-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .address-bar {
        height: 28px;
        font-size: 13px;
    }
    
    .go-btn {
        height: 28px;
        padding: 0 12px;
        font-size: 13px;
    }
    
    .tab {
        min-width: 100px;
        max-width: 150px;
        padding: 4px 8px;
    }
    
    .tab-title {
        font-size: 12px;
    }
    
    .status-bar {
        height: 20px;
        font-size: 10px;
        padding: 1px 8px;
    }
} 